const { ethers, upgrades } = require("hardhat");

module.exports = async () => {
    const NftAuction = await ethers.getContractFactory("NftAuction");

    const nftAuction = await upgrades.deployProxy(
        NftAuction,
        [],
        {
            initializer: "initialize",
            kind: "uups"
        }
    );

    await nftAuction.waitForDeployment();

    console.log("Proxy address:", nftAuction.target);
    const implAddress = await upgrades.erc1967.getImplementationAddress(nftAuction.target);
    console.log("Implementation address:", implAddress);
};
